#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<assert.h>
#include<string.h>
void* my_memmove(void* dest, const void* sou, size_t num)
{
	assert(dest && sou);
	void* p = dest;
	if (dest < sou)
	{
		while (num--)
		{
			*(char*)dest = *(char*)sou;
			dest = (char*)dest + 1;
			sou = (char*)sou + 1;
		}
	}
	else
	{
		while (num--)
		{
			*((char*)dest + num) = *((char*)sou + num);
		}
	}
	return p;
}
int main()
{
	int arr[] = { 1,2,3,4,5,7,8,0 };
	my_memmove(arr, arr + 2, 8);
	return 0;
}